﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UClaimDemageControlEdit.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.UserModel.UClaimDemageControlEdit" %>
<div class="pageContent">
	<form method="post" action="UserModel/UClaimDemageControlEdit.aspx?ajaxmethod=edit" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<div class="pageFormContent" layoutH="56">			
            <div  class="titleshowlegent">
            索赔单信息
           </div>
           <p>
				<label>品情单号：</label>
				<input name="ClaimsNumber"  type="text" class="required" readonly  value="<%=obj.ClaimsNumber %>" />
			</p>
            <p>
				<label>机号：</label>
				<input name="SerialNumber"  type="text" class="required"  value="<%=obj.SerialNumber %>" onblur="UClaimDemageControlEdit_GetIntoDate($(this))" />
			</p>
            <p>
				<label>接到故障日：</label>
				<input name="FaultDate" class="required date" type="text" value="<%=obj.FaultDate.ToString("yyyy-MM-dd") %>" alt="" format="yyyy-MM-dd"/>
			</p>
             <p>
				<label>代理商：</label>
			     <input type="text" name="AgentName" value="<%=obj.AgentName %>" class="required autocomplete" alt=""  autocompletehref="<%=AutoCompleteRequestUrl %>?ajaxmethod=getagentlist&showtype=CardCode" swidth="300" showinputid=""/>
               
			</p>
            <div class="divider"></div>
            <p>
				<label>交机日期：</label>
				<input id="UClaimDemageControlEdit_IntoDate" name="IntoDate"  type="text" class="" readonly  value="<%=GetIntoDate() %>" />
			</p>
            <div class="divider"></div>
           <p>
				<label>用户：</label>
				<input name="CustomerName"  type="text" class=""  value="<%=obj.CustomerName %>" />
			</p>
            <p>
				<label>机型：</label>
				<%=GetMacType("select", "MachineType", obj.MachineType)%>
			</p>
            <p>
				<label>工作小时 ：</label>
				<input name="WorkHour"  type="text" class="inputFloat"  value="<%=obj.WorkHour.ToString("F1") %>" />
			</p>
            <div class="divider"></div>
            <dl class="nowrap">
				<dt>故障描述：</dt>
                <dd><textarea name="FaultDescription"  style="width:250px; height:30px;"><%=obj.FaultDescription%></textarea></dd>               
            </dl>
            <div class="divider"></div>
            <dl class="nowrap">
				<dt>处理方式：</dt>
                <dd><textarea name="ProcessMode"  style="width:250px; height:30px;"><%=obj.ProcessMode%></textarea></dd>               
            </dl>
             <% if (HasPower(IHISCETeim.Web.Permission.索赔管控_责任归属初判))
                {%>
          <div  class="titleshowlegent">
            责任归属初判
           </div>
           <table style="width: 95%;" class="mylist">
                <thead>                    
                    <tr>
                        <th>归属1</th>
                        <th>归属2</th>
                        <th>
                            归属3
                        </th>
                         <th>
                            归属4
                        </th>
                        <th>归属5</th>
                        <th>归属6(IHISCE责任)</th>
                        <th>
                            备注
                        </th>
                    </tr>
                 </thead>
                 <tbody>
                    <tr class="mytr">
                        <td >
                             <input name="DutyPanDing"  type="text" class="autocomplete"  value="<%=GetDutyPanDing(1) %>"  autocompletehref="<%=AutoCompleteRequestUrl %>?ajaxmethod=getsupplierlist" swidth="300px" showinputid=""/>                  
                        </td>
                        <td >
                             <input name="DutyPanDing"  type="text" class="autocomplete"  value="<%=GetDutyPanDing(2) %>"  autocompletehref="<%=AutoCompleteRequestUrl %>?ajaxmethod=getsupplierlist" swidth="300px" showinputid=""/>                    
                        </td>
                        <td >
                             <input name="DutyPanDing"  type="text" class="autocomplete"  value="<%=GetDutyPanDing(3) %>"  autocompletehref="<%=AutoCompleteRequestUrl %>?ajaxmethod=getsupplierlist" swidth="300px" showinputid=""/>                    
                        </td>
                        <td >
                          <input name="DutyPanDing"  type="text" class="autocomplete"  value="<%=GetDutyPanDing(4) %>"  autocompletehref="<%=AutoCompleteRequestUrl %>?ajaxmethod=getsupplierlist" swidth="300px" showinputid=""/>
                        </td>

                         <td>
                           <input name="DutyPanDing"  type="text" class="autocomplete"  value="<%=GetDutyPanDing(5) %>"  autocompletehref="<%=AutoCompleteRequestUrl %>?ajaxmethod=getsupplierlist" swidth="300px" showinputid=""/>
                        </td>

                        <td>
                            <select name="DutyPanDing">
                                <%=GetDutyPanDingSelect(GetDutyPanDing(6))%>
                            </select>
                        </td>
                        <td>
                           <input name="DutyPanDingRemark"  type="text"   value="<%=obj.DutyPanDingRemark %>" />
                        </td>
                    </tr>
                 </tbody>
            </table>
            <%} %>
            <div  class="titleshowlegent">
            索赔费成本(RMB)
           </div>
            <p>
                <label style="width:160px!important;">1.IHISCE配件发货运费:</label>
                <input name="SendPartTransportCost"  type="text" class="inputFloat"  value="<%=obj.SendPartTransportCost %>" />
            </p>
            <p style="clear:both;width:100%!important;">
                <label style="width:160px!important;">2.代理商索赔费(RMB):</label>
                是否已提交:<input type="checkbox" name="AgentIsSubmit" value="true"  <%=obj.AgentIsSubmit?"checked":"" %>/>                
            </p>
            <div style=" clear:both; margin-bottom:5px;">
                 <table style="width: 95%;" class="mylist">
                   <thead>
                    <tr>
                        <th>批复时间</th>
                        <th>报销时间</th>
                        <th>凭证号</th>
                        <th>是否可索赔</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td><input name="PiFuDate" class="date" value="<%=obj.PiFuDate %>"/></td>
                        <td><input name="BaoXiaoDate" class="" value="<%=obj.BaoXiaoDate %>"/></td>
                        <td><input name="PingZhengHao" class="" value="<%=obj.PingZhengHao %>"/></td>
                        <td><input name="CanSuoPei" class="" value="<%=obj.CanSuoPei %>"/></td>
                    </tr>
                    </tbody>
                 </table>
            </div>
            <p style="clear:both;width:100%!important;">
                <label style="width:160px!important;">3.派工次数:</label>
                <select name="PaiGongCiShu">
                        <option value=1 <%=obj.PaiGongCiShu==1?"selected":"" %>>派工1次</option>
                        <option value=2 <%=obj.PaiGongCiShu==2?"selected":"" %>>派工2次</option>
                        <option value=3 <%=obj.PaiGongCiShu==3?"selected":"" %>>派工3次</option>
                        <option value=4 <%=obj.PaiGongCiShu==4?"selected":"" %>>派工4次</option>
                    </select>               
            </p>
            <table style="width: 95%;" class="mylist">
                <thead>                    
                    <tr>
                        <th>外购费</th>
                        <th>工时费</th>
                        <th>
                            出车费
                        </th>
                         <th>
                            差旅费
                        </th>
                        <th>运输费邮寄费</th>
                        <th>其他</th>
                    </tr>
                 </thead>
                 <tbody>
                    <tr class="mytr">
                        <td >
                             <input name="AgentPartCost"  type="text" class="inputFloat"  value="<%=obj.AgentPartCost %>" />                  
                        </td>
                        <td >
                             <input name="AgentWorkCost"  type="text" class="inputFloat"  value="<%=obj.AgentWorkCost %>" />                    
                        </td>
                        <td >
                             <input name="AgentOutCost"  type="text" class="inputFloat"  value="<%=obj.AgentOutCost %>" />                    
                        </td>
                        <td >
                          <input name="AgentTravelCost"  type="text" class="inputFloat"  value="<%=obj.AgentTravelCost %>" />
                        </td>

                         <td>
                           <input name="AgentTransportCost"  type="text" class="inputFloat"  value="<%=obj.AgentTransportCost %>"      
                        </td>

                        <td>
                            <input name="AgentOtherCost"  type="text" class="inputFloat"  value="<%=obj.AgentOtherCost %>" />
                        </td>
                    
                    </tr>
                 </tbody>
            </table>

            <input type="hidden" name="FinalDiffAnalyse" value="<%=obj.FinalDiffAnalyse %>" />
            <input type="hidden" name="SupplerDiffAnalyse" value="<%=obj.SupplerDiffAnalyse %>" />
            <input type="hidden" name="DiffDuty" value="<%=obj.DiffDuty %>" />
            <div  class="titleshowlegent">
            经销商平台配件需求情况
           </div>
           <asp:repeater id="rpAgentQltyParts" runat="server">
            <HeaderTemplate>  
                <table style="width: 95%;" class="mylist">
                <thead>                    
                    <tr>
                        
                        <th>
                            物料号
                        </th>
                         <th>
                            物料名称
                        </th>
                        <th>数量</th>
                        <th>最后的采购价(成本)</th>
                        <th>配件需求类型</th>
                        <th>备注</th>
                        <th>是否需返回</th>
                    </tr>
                 </thead>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>                   
                    <td >
                         <%# Eval("ItemCode")%>                       
                    </td>
                    <td >
                        <%# Eval("Dscription")%>
                    </td>

                     <td>
                        <%# Eval("Quantity")%>       
                    </td>
                    <td>
                        <%# Eval("LastPurPrice")%>       
                    </td>
                    <td>
                        <%# Eval("PartsDemand")%>
                    </td>
                   
                      <td>
                        <%# Eval("Remark")%>
                    </td>
                      <td>
                        <%# Eval("InStock")%>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>               
            </table>
            </FooterTemplate> 
         </asp:repeater>
            <div  class="titleshowlegent">
            IHISCE索赔件部份
           </div>
           <asp:repeater id="rpAnalyse" runat="server">
            <HeaderTemplate>  
                <table style="width: 95%;" class="mylist">
                <thead>                    
                    <tr>
                        <th>出库单号</th>
                        <th>
                            物料号
                        </th>
                         <th>
                            物料名称
                        </th>
                        <th>数量</th>
                        <th>金额</th>
                        <th>出库类型</th>
                    </tr>
                 </thead>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td >
                         <%# Eval("DocEntry")%>                       
                    </td>
                    <td >
                         <%# Eval("ItemCode")%>                       
                    </td>
                    <td >
                        <%# Eval("Dscription")%>
                    </td>

                     <td>
                        <%# Eval("Quantity")%>       
                    </td>

                    <td>
                        <%# Eval("LineTotal")%>
                    </td>
                    <td>
                        <%# Eval("U_OutTypeText")%>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>               
            </table>
            </FooterTemplate> 
         </asp:repeater>

          <div  class="titleshowlegent">
                故障件的物料(请输入原材料物料号码)
           </div>
           <table style="clear:both;width: 100%;" class="mylist">
                <tr>
                    <th width="40%">原材料号码</th>
                    <th>名称</th>
                    <th>数量</th>
                </tr>
                <asp:repeater id="rpOITMDetail" runat="server">
                <ItemTemplate> 
                <tr>
                    <td>
                        <input type="text" name="DetailItemCode" value="<%# Eval("ItemCode")%>" />
                    </td>
                    <td>
                        <%# Eval("ItemName")%>
                    </td>
                    <td>
                        <input type="text" name="DetailQuantity" class="inputFloat" value="<%# Eval("Quantity")%>" />
                    </td>
                </tr>
                </ItemTemplate>
              
             </asp:repeater>
           </table>
		</div>
		<div class="formBar">
			<ul>
				 <% if (HasPower(IHISCETeim.Web.Permission.修改))
        {%>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
                <%} %>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
<script type="text/javascript">
    
    function UClaimDemageControlEdit_GetIntoDate($obj)
    {
        var $data = {};
        var $this = $obj;
        $data["SerialNumbert"] = $this.val();
        var url = "/MachineSys/sysAjaxDone.ashx?ajaxmethod=getuwarrantycardbyserialnumbert"
        $.ajax({
            type: 'post',
            url: url,
            data: $data,
            async: false,
            cache: false,
            dataType: 'json',
            success: function (json) {
              
                $("#UClaimDemageControlEdit_IntoDate").val(json.IntoDate);
            }
        });
    }
</script>